using System;
using System.Data;
using System.Data.SqlClient;
using DTN.Core.Utilities;
namespace com.dtn.deals
{
    public class tblGroupFilter
    {
        private int groupFilterId;
        public int GroupFilterId
        {
            get { return groupFilterId; }
            set { groupFilterId = value; }
        }

        private string groupName;
        public string GroupName
        {
            get { return groupName; }
            set { groupName = value; }
        }

        private int parentId;
        public int ParentId
        {
            get { return parentId; }
            set { parentId = value; }
        }

        private int categoryId;
        public int CategoryId
        {
            get { return categoryId; }
            set { categoryId = value; }
        }

        private string description;
        public string Description
        {
            get { return description; }
            set { description = value; }
        }
        private int _parentCate;

        public int ParentCate
        {
            get { return _parentCate; }
            set { _parentCate = value; }
        }

        public tblGroupFilter()
        {
        }
        public tblGroupFilter(DataRow info)
        {
            groupFilterId = ConvertUtility.ToInt32(info["GroupFilterId"]);
            groupName = ConvertUtility.ToString(info["GroupName"]);
            parentId = ConvertUtility.ToInt32(info["ParentId"]);
            categoryId = ConvertUtility.ToInt32(info["CategoryId"]);
            description = ConvertUtility.ToString(info["Description"]);
        }
        public tblGroupFilter(DataRowView info)
        {
            groupFilterId = ConvertUtility.ToInt32(info["GroupFilterId"]);
            groupName = ConvertUtility.ToString(info["GroupName"]);
            parentId = ConvertUtility.ToInt32(info["ParentId"]);
            categoryId = ConvertUtility.ToInt32(info["CategoryId"]);
            description = ConvertUtility.ToString(info["Description"]);
        }

        public tblGroupFilter(SqlDataReader dr)
        {
            groupFilterId = ConvertUtility.ToInt32(dr["GroupFilterId"]);
            groupName = ConvertUtility.ToString(dr["GroupName"]);
            parentId = ConvertUtility.ToInt32(dr["ParentId"]);
            categoryId = ConvertUtility.ToInt32(dr["CategoryId"]);
            description = ConvertUtility.ToString(dr["Description"]);
        }
    }
}

